/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package bpel2rep.version.impl;

import bpel2rep.process.ProcessPackage;

import bpel2rep.process.impl.ProcessPackageImpl;

import bpel2rep.version.MetaInfo;
import bpel2rep.version.StateName;
import bpel2rep.version.StatusName;
import bpel2rep.version.Version;
import bpel2rep.version.VersionFactory;
import bpel2rep.version.VersionId;
import bpel2rep.version.VersionPackage;
import bpel2rep.version.VersionState;
import bpel2rep.version.VersionStore;

import bpel2rep.version.WorkingStatus;
import bpel2rep.version.state.StatePackage;

import bpel2rep.version.state.impl.StatePackageImpl;

import bpel2rep.version.store.StorePackage;

import bpel2rep.version.store.impl.StorePackageImpl;

import executable.ExecutablePackage;

import executable.impl.ExecutablePackageImpl;

import namespace.NamespacePackage;

import namespace.impl.NamespacePackageImpl;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;

import org.eclipse.emf.ecore.impl.EPackageImpl;

import org.eclipse.emf.ecore.xml.type.XMLTypePackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class VersionPackageImpl extends EPackageImpl implements VersionPackage {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass metaInfoEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass versionStateEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass versionEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass versionIdEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass versionStoreEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass workingStatusEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EEnum stateNameEEnum = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EEnum statusNameEEnum = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see bpel2rep.version.VersionPackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private VersionPackageImpl() {
		super(eNS_URI, VersionFactory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this
	 * model, and for any others upon which it depends.  Simple
	 * dependencies are satisfied by calling this method on all
	 * dependent packages before doing anything else.  This method drives
	 * initialization for interdependent packages directly, in parallel
	 * with this package, itself.
	 * <p>Of this package and its interdependencies, all packages which
	 * have not yet been registered by their URI values are first created
	 * and registered.  The packages are then initialized in two steps:
	 * meta-model objects for all of the packages are created before any
	 * are initialized, since one package's meta-model objects may refer to
	 * those of another.
	 * <p>Invocation of this method will not affect any packages that have
	 * already been initialized.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static VersionPackage init() {
		if (isInited) return (VersionPackage)EPackage.Registry.INSTANCE.getEPackage(VersionPackage.eNS_URI);

		// Obtain or create and register package
		VersionPackageImpl theVersionPackage = (VersionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof VersionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new VersionPackageImpl());

		isInited = true;

		// Initialize simple dependencies
		XMLTypePackage.eINSTANCE.eClass();

		// Obtain or create and register interdependencies
		StatePackageImpl theStatePackage = (StatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StatePackage.eNS_URI) instanceof StatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StatePackage.eNS_URI) : StatePackage.eINSTANCE);
		StorePackageImpl theStorePackage = (StorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI) instanceof StorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI) : StorePackage.eINSTANCE);
		ProcessPackageImpl theProcessPackage = (ProcessPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ProcessPackage.eNS_URI) instanceof ProcessPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ProcessPackage.eNS_URI) : ProcessPackage.eINSTANCE);
		ExecutablePackageImpl theExecutablePackage = (ExecutablePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ExecutablePackage.eNS_URI) instanceof ExecutablePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ExecutablePackage.eNS_URI) : ExecutablePackage.eINSTANCE);
		NamespacePackageImpl theNamespacePackage = (NamespacePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NamespacePackage.eNS_URI) instanceof NamespacePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NamespacePackage.eNS_URI) : NamespacePackage.eINSTANCE);

		// Load packages
		theExecutablePackage.loadPackage();

		// Create package meta-data objects
		theVersionPackage.createPackageContents();
		theStatePackage.createPackageContents();
		theStorePackage.createPackageContents();
		theProcessPackage.createPackageContents();
		theNamespacePackage.createPackageContents();

		// Initialize created meta-data
		theVersionPackage.initializePackageContents();
		theStatePackage.initializePackageContents();
		theStorePackage.initializePackageContents();
		theProcessPackage.initializePackageContents();
		theNamespacePackage.initializePackageContents();

		// Fix loaded packages
		theExecutablePackage.fixPackageContents();

		// Mark meta-data to indicate it can't be changed
		theVersionPackage.freeze();

		return theVersionPackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getMetaInfo() {
		return metaInfoEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getMetaInfo_Id() {
		return (EAttribute)metaInfoEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getMetaInfo_Description() {
		return (EAttribute)metaInfoEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getMetaInfo_Name() {
		return (EAttribute)metaInfoEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getVersionState() {
		return versionStateEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getVersionState_Version() {
		return (EReference)versionStateEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getVersion() {
		return versionEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getVersion_VersionState() {
		return (EReference)versionEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getVersion_MetaInfo() {
		return (EReference)versionEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getVersion_Process() {
		return (EReference)versionEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getVersion_Predecessor() {
		return (EReference)versionEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getVersion_VersionId() {
		return (EReference)versionEClass.getEStructuralFeatures().get(4);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getVersion_StateName() {
		return (EAttribute)versionEClass.getEStructuralFeatures().get(5);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getVersionId() {
		return versionIdEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getVersionId_MajorID() {
		return (EAttribute)versionIdEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getVersionId_MinorID() {
		return (EAttribute)versionIdEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getVersionStore() {
		return versionStoreEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getWorkingStatus() {
		return workingStatusEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getWorkingStatus_StatusName() {
		return (EAttribute)workingStatusEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getWorkingStatus_Msg() {
		return (EAttribute)workingStatusEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EEnum getStateName() {
		return stateNameEEnum;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EEnum getStatusName() {
		return statusNameEEnum;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public VersionFactory getVersionFactory() {
		return (VersionFactory)getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated) return;
		isCreated = true;

		// Create classes and their features
		metaInfoEClass = createEClass(META_INFO);
		createEAttribute(metaInfoEClass, META_INFO__ID);
		createEAttribute(metaInfoEClass, META_INFO__DESCRIPTION);
		createEAttribute(metaInfoEClass, META_INFO__NAME);

		versionStateEClass = createEClass(VERSION_STATE);
		createEReference(versionStateEClass, VERSION_STATE__VERSION);

		versionEClass = createEClass(VERSION);
		createEReference(versionEClass, VERSION__VERSION_STATE);
		createEReference(versionEClass, VERSION__META_INFO);
		createEReference(versionEClass, VERSION__PROCESS);
		createEReference(versionEClass, VERSION__PREDECESSOR);
		createEReference(versionEClass, VERSION__VERSION_ID);
		createEAttribute(versionEClass, VERSION__STATE_NAME);

		versionIdEClass = createEClass(VERSION_ID);
		createEAttribute(versionIdEClass, VERSION_ID__MAJOR_ID);
		createEAttribute(versionIdEClass, VERSION_ID__MINOR_ID);

		versionStoreEClass = createEClass(VERSION_STORE);

		workingStatusEClass = createEClass(WORKING_STATUS);
		createEAttribute(workingStatusEClass, WORKING_STATUS__STATUS_NAME);
		createEAttribute(workingStatusEClass, WORKING_STATUS__MSG);

		// Create enums
		stateNameEEnum = createEEnum(STATE_NAME);
		statusNameEEnum = createEEnum(STATUS_NAME);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Obtain other dependent packages
		StatePackage theStatePackage = (StatePackage)EPackage.Registry.INSTANCE.getEPackage(StatePackage.eNS_URI);
		StorePackage theStorePackage = (StorePackage)EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI);
		XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
		ProcessPackage theProcessPackage = (ProcessPackage)EPackage.Registry.INSTANCE.getEPackage(ProcessPackage.eNS_URI);

		// Add subpackages
		getESubpackages().add(theStatePackage);
		getESubpackages().add(theStorePackage);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes

		// Initialize classes and features; add operations and parameters
		initEClass(metaInfoEClass, MetaInfo.class, "MetaInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getMetaInfo_Id(), theXMLTypePackage.getString(), "id", "0", 0, 1, MetaInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getMetaInfo_Description(), ecorePackage.getEString(), "description", null, 0, 1, MetaInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getMetaInfo_Name(), ecorePackage.getEString(), "name", null, 0, 1, MetaInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(versionStateEClass, VersionState.class, "VersionState", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getVersionState_Version(), this.getVersion(), null, "version", null, 0, 1, VersionState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		addEOperation(versionStateEClass, null, "checkoutuse", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionStateEClass, null, "endSimuleSession", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionStateEClass, null, "startSimuleSession", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionStateEClass, null, "lockUse", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionStateEClass, null, "lockWork", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionStateEClass, null, "lockSimule", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionStateEClass, null, "unlockSimule", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionStateEClass, null, "unlockUse", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionStateEClass, null, "unlockWork", 0, 1, IS_UNIQUE, IS_ORDERED);

		EOperation op = addEOperation(versionStateEClass, null, "checkin", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getVersion(), "version", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEBoolean(), "isMajor", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getWorkingStatus(), "status", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(versionStateEClass, this.getVersion(), "checkout", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "processId", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getVersionId(), "versionId", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getWorkingStatus(), "status", 0, 1, IS_UNIQUE, IS_ORDERED);

		initEClass(versionEClass, Version.class, "Version", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getVersion_VersionState(), this.getVersionState(), null, "versionState", null, 1, 1, Version.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getVersion_MetaInfo(), this.getMetaInfo(), null, "metaInfo", null, 1, 1, Version.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getVersion_Process(), theProcessPackage.getProcess(), null, "process", null, 1, 1, Version.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getVersion_Predecessor(), this.getVersionId(), null, "predecessor", null, 1, 1, Version.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getVersion_VersionId(), this.getVersionId(), null, "versionId", null, 1, 1, Version.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getVersion_StateName(), this.getStateName(), "StateName", "", 0, 1, Version.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		op = addEOperation(versionEClass, null, "checkin", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getVersion(), "version", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEBoolean(), "isMajor", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getWorkingStatus(), "status", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(versionEClass, this.getVersion(), "checkout", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "processId", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getVersionId(), "versionId", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getWorkingStatus(), "status", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionEClass, null, "checkoutuse", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionEClass, null, "endSimuleSession", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionEClass, null, "startSimuleSession", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionEClass, null, "lockUse", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionEClass, null, "lockWork", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionEClass, null, "lockSimule", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionEClass, null, "unlockSimule", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionEClass, null, "unlockUse", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionEClass, null, "unlockWork", 0, 1, IS_UNIQUE, IS_ORDERED);

		initEClass(versionIdEClass, VersionId.class, "VersionId", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getVersionId_MajorID(), ecorePackage.getEInt(), "majorID", null, 1, 1, VersionId.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getVersionId_MinorID(), ecorePackage.getEInt(), "minorID", null, 1, 1, VersionId.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(versionStoreEClass, VersionStore.class, "VersionStore", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		op = addEOperation(versionStoreEClass, null, "save", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getVersion(), "v", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(versionStoreEClass, this.getVersion(), "retrieve", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "processId", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(versionStoreEClass, null, "delete", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(versionStoreEClass, this.getVersion(), "retrieve", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "processId", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getVersionId(), "versionId", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(versionStoreEClass, ecorePackage.getEBoolean(), "inStore", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getVersion(), "version", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(versionStoreEClass, this.getStateName(), "getStateName", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "processId", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getVersionId(), "versionId", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(versionStoreEClass, null, "update", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getVersion(), "version", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = addEOperation(versionStoreEClass, null, "updateState", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "processId", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getVersionId(), "versionId", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getStateName(), "newStateName", 0, 1, IS_UNIQUE, IS_ORDERED);

		initEClass(workingStatusEClass, WorkingStatus.class, "WorkingStatus", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getWorkingStatus_StatusName(), this.getStatusName(), "statusName", null, 0, 1, WorkingStatus.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getWorkingStatus_Msg(), ecorePackage.getEString(), "msg", null, 0, 1, WorkingStatus.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		// Initialize enums and add enum literals
		initEEnum(stateNameEEnum, StateName.class, "StateName");
		addEEnumLiteral(stateNameEEnum, StateName.LOCK_WORK);
		addEEnumLiteral(stateNameEEnum, StateName.FREE);
		addEEnumLiteral(stateNameEEnum, StateName.INITIAL);

		initEEnum(statusNameEEnum, StatusName.class, "StatusName");
		addEEnumLiteral(statusNameEEnum, StatusName.NORMAL);
		addEEnumLiteral(statusNameEEnum, StatusName.WARNING);
		addEEnumLiteral(statusNameEEnum, StatusName.ERROR);

		// Create resource
		createResource(eNS_URI);

		// Create annotations
		// teneo.jpa
		createTeneoAnnotations();
	}

	/**
	 * Initializes the annotations for <b>teneo.jpa</b>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void createTeneoAnnotations() {
		String source = "teneo.jpa";		
		addAnnotation
		  (versionStateEClass, 
		   source, 
		   new String[] {
		   });
	}

} //VersionPackageImpl
